На этой странице Вы можете получить подробный анализ слова или словосочетания, произведенный с помощью лучшей на сегодняшний день технологии искусственного интеллекта:
In computer science, Van Wijngaarden grammars (also vW-grammars or W-grammars) are a formalism for defining formal languages invented by Adriaan van Wijngaarden for the purpose of defining the ALGOL 68 programming language. The resulting specification remains its most notable application.
W-grammars are two-level grammars: they are defined by a pair of grammars, that operate on different levels:
The set of strings generated by a W-grammar is defined by a two-stage process:
The consistent substitution used in the first step is the same as substitution in predicate logic, and actually supports logic programming; it corresponds to unification in Prolog, as noted by Alain Colmerauer.
W-grammars are Turing complete; hence, all decision problems regarding the languages they generate, such as
are undecidable.
Curtailed variants, known as affix grammars, were developed, and applied in compiler construction and to the description of natural languages.
Another curtailed version of W-grammars is Prolog, the logic programming language.